package qingke.hibernate.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="course_setting")
public class CourseSetting {
	@Id
	@Column(name="id")
	private int id;
	@Column(name="class_time")
	private String classTime;
	@Column(name="class_capacity")
	private int classCapacity;
	@Column(name="class_remain")
	private int classRemain;
	
	@OneToMany
	@JoinColumn(name = "course_setting_id")
	private Set<CourseSelect> courseSelect;
	
	@ManyToOne
	@JoinColumn(name = "teacher_id")
	private Teacher teacher;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getClassTime() {
		return classTime;
	}

	public void setClassTime(String classTime) {
		this.classTime = classTime;
	}

	public int getClassCapacity() {
		return classCapacity;
	}

	public void setClassCapacity(int classCapacity) {
		this.classCapacity = classCapacity;
	}

	public int getClassRemain() {
		return classRemain;
	}

	public void setClassRemain(int classRemain) {
		this.classRemain = classRemain;
	}

	public Set<CourseSelect> getCourseSelect() {
		return courseSelect;
	}

	public void setCourseSelect(Set<CourseSelect> courseSelect) {
		this.courseSelect = courseSelect;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	@Override
	public String toString() {
		return "CourseSetting [id=" + id + ", classTime=" + classTime + ", classCapacity=" + classCapacity
				+ ", classRemain=" + classRemain + "]";
	}
	
	
}
